#!/usr/bin/perl
my ($fr,$fw,$number_of_lines) = @ARGV;
$count = 0;
open(FR,"<:utf8",$fr) || die("Cannot open file");
open(FW,">:utf8",$fw)  || die("Cannot open file");
while(<FR>)
{
	
	if($count < $number_of_lines)
	{
		print FW $_;
	  	$count++;
	}
	else
	{
		last;
	}

}
close FR;
close FW;
